home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 326-350 / disk_338 / sastools / wbruise / hardtricks.mod < prev    next >
Text File  |  1992-05-06  |  2KB  |  75 lines

  1. (***************************************************************************
  2. *  Programme : Hardtricks.mod         (This is not a real programme, but a *
  3. *                                      implementation module)              *
  4. *  Usage     : use it together with Hardtricks.def in own programmes       *
  5. *  Version   : V1.11                                                       *
  6. *  Date      : 01.-04.05.1989                                              *
  7. *  Author    : Jörg Sixt and Martin Murnleiter                             *
  8. *  Purpose   : a nice mix of procedures                                    *
  9. *  Language  : Modula-2,AMSoft  PD-Version from Fish 113                   *
  10. *  Bugs      : using devices would be better                               *
  11. *                                                                          *
  12. *  You may include both modules in your own programmes for free except for *
  13. *  commercial software (send me e.g. this programme then). Leave my name   *
  14. *  in this source and mention me somewhere in the documentation/programme  *
  15. ***************************************************************************)
  16.  
  17. IMPLEMENTATION MODULE Hardtricks ; (* my first one ! *)
  18.  
  19. FROM SYSTEM IMPORT BITSET ;
  20.  
  21. PROCEDURE PowerLED (How : Button) ;
  22.  
  23.     VAR LED [12574721] : CHAR ;
  24.  
  25.     BEGIN
  26.        IF (How = on)  OR  ((How = toggle) AND (LED = 376C)) THEN
  27.           LED := 374C ;
  28.        ELSE
  29.           LED := 376C
  30.        END ;
  31.     END PowerLED ;
  32.  
  33. PROCEDURE DriveLED (How : Button) ;
  34.  
  35.     VAR LED [12570880]     : CHAR ;
  36.         LCD [12570880+512] : CHAR ;
  37.  
  38.     BEGIN
  39.        IF (How = on)  OR  ((How = toggle) AND (LCD = 377C)) THEN
  40.           LED := 177C ;
  41.           LED := 167C ;
  42.           LCD :=   0C ;
  43.        ELSE
  44.           LCD := 377C ;
  45.        END ;
  46.     END DriveLED ;
  47.  
  48. PROCEDURE rightMouseButton() : BOOLEAN ;
  49.  
  50.     VAR POTGOR [0DFF016H] : BITSET ;
  51.  
  52.     BEGIN
  53.        RETURN (NOT(10 IN POTGOR)) ;
  54.     END rightMouseButton ;
  55.  
  56. PROCEDURE leftMouseButton() : BOOLEAN ;
  57.  
  58.     VAR CIA [0BFE001H] : SET OF [0..7] ;
  59.  
  60.     BEGIN
  61.        RETURN (NOT(6 IN CIA)) ;
  62.     END leftMouseButton ;
  63.  
  64. PROCEDURE AskRawKey() : CARDINAL ;
  65.  
  66.     VAR Register [12577793] : CHAR ;
  67.  
  68.     BEGIN
  69.        RETURN (ORD(Register)) ;
  70.     END AskRawKey ;
  71.  
  72. END Hardtricks .
  73.  
  74.  
  75.